<template>
  <div :class="$style.pageRegister">
    <p class="f36 cBasic2">我已阅读并同意<a href="javascript:;" class="uLinkBlue">《信用宝服务协议》</a></p>
    <section class="inputWrap">
      <input-item
        inputTitleTxt="手机号码"
        inputPlaceholderTxt="请输入手机号码"
        inputType="inputTypePhoneNumber"
        ref="inputPhoneNumber"
      ></input-item>
      <input-item
        inputTitleTxt="图形码"
        inputPlaceholderTxt="请输入图形码"
        inputType="inputTypeImgCode"
        ref="inputImgCode"
      ></input-item>
      <input-item
        inputTitleTxt="验证码"
        inputPlaceholderTxt="请输入短信验证码"
        inputType="inputTypeMsgCode"
        ref="inputMsgCode"
      ></input-item>
      <input-item
        inputTitleTxt="登录密码"
        inputPlaceholderTxt="6~20位包含英文数字下划线"
        inputType="inputTypePassword"
        ref="inputPassword"
      ></input-item>
    </section>
    <recommend ref="inputRecommend"></recommend>
    <a href="javascript:;" class="uBtn uBtnPrimary uBtnLarge mt90 mb60" @click="registerHandle">注册</a>
    <p class="f36 cBasic2">注册遇到问题？请联系客服 <a href="tel:400-070-7663" class="uLinkBlue">400-070-7663</a></p>
  </div>
</template>

<script>
  import inputItem from '@/pagesmodule/input'
  import recommend from '@/pagesmodule/recommend'
  import {inputRegexp} from '@/utils/fn'

  export default {
    name: 'pageRegister',
    components: {
      inputItem,
      recommend
    },
    methods: {
      registerHandle () {
        inputRegexp(this.$refs.inputPhoneNumber)
        inputRegexp(this.$refs.inputImgCode)
        inputRegexp(this.$refs.inputMsgCode)
        inputRegexp(this.$refs.inputPassword)
        inputRegexp(this.$refs.inputRecommend.$children[0])
        console.log('inputPhoneNumber', this.$refs.inputPhoneNumber)
        console.log('inputRecommend', this.$refs.inputRecommend.$children[0])
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>

<style lang="scss" module>
  html {
    background: #fff;
  }

  .pageRegister {
    padding: 90px 50px 0;
  }
</style>
